package org.apache.ocean.main.search;

import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;

import org.apache.ocean.main.Snapshot;
import org.apache.ocean.main.Index.IndexSnapshot;
import org.apache.ocean.main.search.Search.FacetQueries;
import org.apache.ocean.main.search.Search.FacetQuery;
import org.apache.ocean.main.search.Search.FacetResult;
import org.apache.ocean.main.search.cache.QueryDocSetCacheKey;

public class SnapshotFacetSearch implements Callable<FacetResults> {
	private FacetQueries facetQueries;
	private QueryDocSetCacheKey queryDocSetCacheKey;
	private Snapshot snapshot;
	private ExecutorService executorService;
	
  public SnapshotFacetSearch(FacetQueries facetQueries, QueryDocSetCacheKey queryDocSetCacheKey, Snapshot snapshot, ExecutorService executorService) {
		this.facetQueries = facetQueries;
		this.queryDocSetCacheKey = queryDocSetCacheKey;
		this.snapshot = snapshot;
		this.executorService = executorService;
	}

	public FacetResults call() throws Exception {
  	
  }
	
	private doQuery() throws Exception {
		for (IndexSnapshot indexSnapshot : snapshot.getIndexSnapshots()) {
			IndexFacetQuerySearch indexFacetQuerySearch = new IndexFacetQuerySearch(facetQueries.getQueries(), queryDocSetCacheKey, indexSnapshot);
			FacetResult snapshotFacetResult = indexFacetQuerySearch.call();
			
		}
	}
}
